home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Headers / OLECTL.H < prev    next >
Encoding:
Text File  |  1996-10-04  |  29.2 KB  |  933 lines  |  [TEXT/????]

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // olectl.h     Macintosh OLE Control interfaces
  4. //
  5. //              OLE Version 2.0
  6. //
  7. //              Copyright (c) 1992-1996, Microsoft Corp. All rights reserved.
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10.  
  11.  
  12. #ifndef _OLECTL_H_
  13. #define _OLECTL_H_
  14.  
  15.  
  16. #ifndef __MKTYPLIB__
  17.  
  18. // Set packing to 8
  19. #ifdef _WIN32
  20. #ifndef RC_INVOKED
  21. #pragma pack(8)
  22. #endif // not RC_INVOKED
  23. #endif // _WIN32
  24.  
  25. #ifndef INITGUID
  26. #include <olectlid.h>
  27. #endif
  28.  
  29.  
  30. #ifndef _WIN32
  31.  
  32. /////////////////////////////////////////////////////////////////////////////
  33. // Typedefs for characters and strings in interfaces
  34.  
  35. typedef char OLECHAR;
  36. typedef OLECHAR FAR* LPOLESTR;
  37. typedef const OLECHAR FAR* LPCOLESTR;
  38.  
  39. #endif // not _WIN32
  40.  
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43. // Typedefs for interfaces
  44.  
  45. #ifdef __cplusplus
  46. interface IOleControl;
  47. interface IOleControlSite;
  48. interface ISimpleFrameSite;
  49. interface IErrorLog;
  50. interface IPropertyBag;
  51. interface IPersistPropertyBag;
  52. interface IPersistStreamInit;
  53. interface IPersistMemory;
  54. interface IPropertyNotifySink;
  55. interface IProvideClassInfo;
  56. interface IProvideClassInfo2;
  57. interface IConnectionPointContainer;
  58. interface IEnumConnectionPoints;
  59. interface IConnectionPoint;
  60. interface IEnumConnections;
  61. interface IClassFactory2;
  62. interface ISpecifyPropertyPages;
  63. interface IPerPropertyBrowsing;
  64. interface IPropertyPageSite;
  65. interface IPropertyPage;
  66. interface IPropertyPage2;
  67. interface IFont;
  68. interface IFontDisp;
  69. interface IPicture;
  70. interface IPictureDisp;
  71. #else
  72. typedef interface IOleControl IOleControl;
  73. typedef interface IOleControlSite IOleControlSite;
  74. typedef interface ISimpleFrameSite ISimpleFrameSite;
  75. typedef interface IErrorLog IErrorLog;
  76. typedef interface IPropertyBag IPropertyBag;
  77. typedef interface IPersistPropertyBag IPersistPropertyBag;
  78. typedef interface IPersistStreamInit IPersistStreamInit;
  79. typedef interface IPersistMemory IPersistMemory;
  80. typedef interface IPropertyNotifySink IPropertyNotifySink;
  81. typedef interface IProvideClassInfo IProvideClassInfo;
  82. typedef interface IProvideClassInfo2 IProvideClassInfo2;
  83. typedef interface IConnectionPointContainer IConnectionPointContainer;
  84. typedef interface IEnumConnectionPoints IEnumConnectionPoints;
  85. typedef interface IConnectionPoint IConnectionPoint;
  86. typedef interface IEnumConnections IEnumConnections;
  87. typedef interface IClassFactory2 IClassFactory2;
  88. typedef interface ISpecifyPropertyPages ISpecifyPropertyPages;
  89. typedef interface IPerPropertyBrowsing IPerPropertyBrowsing;
  90. typedef interface IPropertyPageSite IPropertyPageSite;
  91. typedef interface IPropertyPage IPropertyPage;
  92. typedef interface IPropertyPage2 IPropertyPage2;
  93. typedef interface IFont IFont;
  94. typedef interface IFontDisp IFontDisp;
  95. typedef interface IPicture IPicture;
  96. typedef interface IPictureDisp IPictureDisp;
  97. #endif
  98.  
  99. typedef IOleControl * LPOLECONTROL;
  100. typedef IOleControlSite * LPOLECONTROLSITE;
  101. typedef ISimpleFrameSite * LPSIMPLEFRAMESITE;
  102. typedef IErrorLog * LPERRORLOG;
  103. typedef IPropertyBag * LPPROPERTYBAG;
  104. typedef IPersistPropertyBag * LPPERSISTPROPERTYBAG;
  105. typedef IPersistStreamInit * LPPERSISTSTREAMINIT;
  106. typedef IPersistMemory * LPPERSISTMEMORY;
  107. typedef interface IPropertyNotifySink * LPPROPERTYNOTIFYSINK;
  108. typedef IProvideClassInfo * LPPROVIDECLASSINFO;
  109. typedef IProvideClassInfo2 * LPPROVIDECLASSINFO2;
  110. typedef IConnectionPointContainer * LPCONNECTIONPOINTCONTAINER;
  111. typedef IEnumConnectionPoints * LPENUMCONNECTIONPOINTS;
  112. typedef IConnectionPoint * LPCONNECTIONPOINT;
  113. typedef IEnumConnections * LPENUMCONNECTIONS;
  114. typedef IClassFactory2 * LPCLASSFACTORY2;
  115. typedef ISpecifyPropertyPages * LPSPECIFYPROPERTYPAGES;
  116. typedef IPerPropertyBrowsing * LPPERPROPERTYBROWSING;
  117. typedef IPropertyPageSite * LPPROPERTYPAGESITE;
  118. typedef IPropertyPage * LPPROPERTYPAGE;
  119. typedef IPropertyPage2 * LPPROPERTYPAGE2;
  120. typedef IFont * LPFONT;
  121. typedef IFontDisp * LPFONTDISP;
  122. typedef IPicture * LPPICTURE;
  123. typedef IPictureDisp * LPPICTUREDISP;
  124.  
  125.  
  126. /////////////////////////////////////////////////////////////////////////////
  127. // Typedefs for structs
  128.  
  129. typedef struct tagPOINTF FAR* LPPOINTF;
  130. typedef struct tagCONTROLINFO FAR* LPCONTROLINFO;
  131. typedef struct tagCONNECTDATA FAR* LPCONNECTDATA;
  132. typedef struct tagLICINFO FAR* LPLICINFO;
  133. typedef struct tagCAUUID FAR* LPCAUUID;
  134. typedef struct tagCALPOLESTR FAR* LPCALPOLESTR;
  135. typedef struct tagCADWORD FAR* LPCADWORD;
  136. typedef struct tagOCPFIPARAMS FAR* LPOCPFIPARAMS;
  137. typedef struct tagPROPPAGEINFO FAR* LPPROPPAGEINFO;
  138. typedef struct tagFONTDESC FAR* LPFONTDESC;
  139. typedef struct tagPICTDESC FAR* LPPICTDESC;
  140.  
  141.  
  142. /////////////////////////////////////////////////////////////////////////////
  143. // Typedefs for standard scalar types
  144.  
  145. typedef DWORD OLE_COLOR;
  146. typedef long OLE_XPOS_PIXELS;
  147. typedef long OLE_YPOS_PIXELS;
  148. typedef long OLE_XSIZE_PIXELS;
  149. typedef long OLE_YSIZE_PIXELS;
  150. typedef long OLE_XPOS_HIMETRIC;
  151. typedef long OLE_YPOS_HIMETRIC;
  152. typedef long OLE_XSIZE_HIMETRIC;
  153. typedef long OLE_YSIZE_HIMETRIC;
  154. typedef float OLE_XPOS_CONTAINER;
  155. typedef float OLE_YPOS_CONTAINER;
  156. typedef float OLE_XSIZE_CONTAINER;
  157. typedef float OLE_YSIZE_CONTAINER;
  158. typedef enum { triUnchecked = 0, triChecked = 1, triGray = 2 } OLE_TRISTATE;
  159. typedef VARIANT_BOOL OLE_OPTEXCLUSIVE;
  160. typedef VARIANT_BOOL OLE_CANCELBOOL;
  161. typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
  162. typedef UINT OLE_HANDLE;
  163.  
  164.  
  165. /////////////////////////////////////////////////////////////////////////////
  166. // FACILITY_CONTROL status codes
  167.  
  168. #ifndef FACILITY_CONTROL
  169. #define FACILITY_CONTROL 0xa
  170. #endif
  171.  
  172. #define STD_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_CONTROL, n)
  173. #define CTL_E_ILLEGALFUNCTIONCALL       STD_CTL_SCODE(5)
  174. #define CTL_E_OVERFLOW                  STD_CTL_SCODE(6)
  175. #define CTL_E_OUTOFMEMORY               STD_CTL_SCODE(7)
  176. #define CTL_E_DIVISIONBYZERO            STD_CTL_SCODE(11)
  177. #define CTL_E_OUTOFSTRINGSPACE          STD_CTL_SCODE(14)
  178. #define CTL_E_OUTOFSTACKSPACE           STD_CTL_SCODE(28)
  179. #define CTL_E_BADFILENAMEORNUMBER       STD_CTL_SCODE(52)
  180. #define CTL_E_FILENOTFOUND              STD_CTL_SCODE(53)
  181. #define CTL_E_BADFILEMODE               STD_CTL_SCODE(54)
  182. #define CTL_E_FILEALREADYOPEN           STD_CTL_SCODE(55)
  183. #define CTL_E_DEVICEIOERROR             STD_CTL_SCODE(57)
  184. #define CTL_E_FILEALREADYEXISTS         STD_CTL_SCODE(58)
  185. #define CTL_E_BADRECORDLENGTH           STD_CTL_SCODE(59)
  186. #define CTL_E_DISKFULL                  STD_CTL_SCODE(61)
  187. #define CTL_E_BADRECORDNUMBER           STD_CTL_SCODE(63)
  188. #define CTL_E_BADFILENAME               STD_CTL_SCODE(64)
  189. #define CTL_E_TOOMANYFILES              STD_CTL_SCODE(67)
  190. #define CTL_E_DEVICEUNAVAILABLE         STD_CTL_SCODE(68)
  191. #define CTL_E_PERMISSIONDENIED          STD_CTL_SCODE(70)
  192. #define CTL_E_DISKNOTREADY              STD_CTL_SCODE(71)
  193. #define CTL_E_PATHFILEACCESSERROR       STD_CTL_SCODE(75)
  194. #define CTL_E_PATHNOTFOUND              STD_CTL_SCODE(76)
  195. #define CTL_E_INVALIDPATTERNSTRING      STD_CTL_SCODE(93)
  196. #define CTL_E_INVALIDUSEOFNULL          STD_CTL_SCODE(94)
  197. #define CTL_E_INVALIDFILEFORMAT         STD_CTL_SCODE(321)
  198. #define CTL_E_INVALIDPROPERTYVALUE      STD_CTL_SCODE(380)
  199. #define CTL_E_INVALIDPROPERTYARRAYINDEX STD_CTL_SCODE(381)
  200. #define CTL_E_SETNOTSUPPORTEDATRUNTIME  STD_CTL_SCODE(382)
  201. #define CTL_E_SETNOTSUPPORTED           STD_CTL_SCODE(383)
  202. #define CTL_E_NEEDPROPERTYARRAYINDEX    STD_CTL_SCODE(385)
  203. #define CTL_E_SETNOTPERMITTED           STD_CTL_SCODE(387)
  204. #define CTL_E_GETNOTSUPPORTEDATRUNTIME  STD_CTL_SCODE(393)
  205. #define CTL_E_GETNOTSUPPORTED           STD_CTL_SCODE(394)
  206. #define CTL_E_PROPERTYNOTFOUND          STD_CTL_SCODE(422)
  207. #define CTL_E_INVALIDCLIPBOARDFORMAT    STD_CTL_SCODE(460)
  208. #define CTL_E_INVALIDPICTURE            STD_CTL_SCODE(481)
  209. #define CTL_E_PRINTERERROR              STD_CTL_SCODE(482)
  210. #define CTL_E_CANTSAVEFILETOTEMP        STD_CTL_SCODE(735)
  211. #define CTL_E_SEARCHTEXTNOTFOUND        STD_CTL_SCODE(744)
  212. #define CTL_E_REPLACEMENTSTOOLONG       STD_CTL_SCODE(746)
  213.  
  214. #define CUSTOM_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_CONTROL, n)
  215. #define CTL_E_CUSTOM_FIRST              CUSTOM_CTL_SCODE(600)
  216.  
  217.  
  218. /////////////////////////////////////////////////////////////////////////////
  219. // IClassFactory2 status codes
  220.  
  221. #define CLASS_E_NOTLICENSED         (CLASSFACTORY_E_FIRST+2)
  222. // class is not licensed for use
  223.  
  224.  
  225. /////////////////////////////////////////////////////////////////////////////
  226. // IConnectionPoint status codes
  227.  
  228. #define CONNECT_E_FIRST    MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
  229. #define CONNECT_E_LAST     MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
  230. #define CONNECT_S_FIRST    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  231. #define CONNECT_S_LAST     MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  232.  
  233. #define CONNECT_E_NOCONNECTION      (CONNECT_E_FIRST+0)
  234. // there is no connection for this connection id
  235.  
  236. #define CONNECT_E_ADVISELIMIT       (CONNECT_E_FIRST+1)
  237. // this implementation's limit for advisory connections has been reached
  238.  
  239. #define CONNECT_E_CANNOTCONNECT     (CONNECT_E_FIRST+2)
  240. // connection attempt failed
  241.  
  242. #define CONNECT_E_OVERRIDDEN        (CONNECT_E_FIRST+3)
  243. // must use a derived interface to connect
  244.  
  245.  
  246. /////////////////////////////////////////////////////////////////////////////
  247. // DllRegisterServer/DllUnregisterServer status codes
  248.  
  249. #define SELFREG_E_FIRST    MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
  250. #define SELFREG_E_LAST     MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
  251. #define SELFREG_S_FIRST    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  252. #define SELFREG_S_LAST     MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  253.  
  254. #define SELFREG_E_TYPELIB           (SELFREG_E_FIRST+0)
  255. // failed to register/unregister type library
  256.  
  257. #define SELFREG_E_CLASS             (SELFREG_E_FIRST+1)
  258. // failed to register/unregister class
  259.  
  260.  
  261. /////////////////////////////////////////////////////////////////////////////
  262. // IPerPropertyBrowsing status codes
  263.  
  264. #define PERPROP_E_FIRST    MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x0200)
  265. #define PERPROP_E_LAST     MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x020F)
  266. #define PERPROP_S_FIRST    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
  267. #define PERPROP_S_LAST     MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
  268.  
  269. #define PERPROP_E_NOPAGEAVAILABLE   (PERPROP_E_FIRST+0)
  270. // no page available for requested property
  271.  
  272.  
  273. /////////////////////////////////////////////////////////////////////////////
  274. // OLEMISC_ constants
  275.  
  276. #define OLEMISC_INVISIBLEATRUNTIME  0x00000400L
  277. #define OLEMISC_ALWAYSRUN           0x00000800L
  278. #define OLEMISC_ACTSLIKEBUTTON      0x00001000L
  279. #define OLEMISC_ACTSLIKELABEL       0x00002000L
  280. #define OLEMISC_NOUIACTIVATE        0x00004000L
  281. #define OLEMISC_ALIGNABLE           0x00008000L
  282. #define OLEMISC_SIMPLEFRAME         0x00010000L
  283. #define OLEMISC_SETCLIENTSITEFIRST  0x00020000L
  284. #define OLEMISC_IMEMODE             0x00040000L
  285. #define OLEMISC_WANTSTOMENUMERGE    0x00080000L
  286.  
  287.  
  288. /////////////////////////////////////////////////////////////////////////////
  289. // OLEIVERB_ constants
  290.  
  291. #ifndef OLEIVERB_PROPERTIES
  292. #define OLEIVERB_PROPERTIES (-7L)
  293. #endif
  294.  
  295.  
  296. /////////////////////////////////////////////////////////////////////////////
  297. // Variant type (VT_) tags for property sets
  298.  
  299. #define VT_STREAMED_PROPSET 73  //       [P]  Stream contains a property set
  300. #define VT_STORED_PROPSET   74  //       [P]  Storage contains a property set
  301. #define VT_BLOB_PROPSET     75  //       [P]  Blob contains a property set
  302. #define VT_VERBOSE_ENUM        76    //       [P]  Enum value with text string
  303.  
  304.  
  305. /////////////////////////////////////////////////////////////////////////////
  306. // Variant type (VT_) tags that are just aliases for others
  307.  
  308. #define VT_COLOR            VT_I4
  309. #define VT_XPOS_PIXELS      VT_I4
  310. #define VT_YPOS_PIXELS      VT_I4
  311. #define VT_XSIZE_PIXELS     VT_I4
  312. #define VT_YSIZE_PIXELS     VT_I4
  313. #define VT_XPOS_HIMETRIC    VT_I4
  314. #define VT_YPOS_HIMETRIC    VT_I4
  315. #define VT_XSIZE_HIMETRIC   VT_I4
  316. #define VT_YSIZE_HIMETRIC   VT_I4
  317. #define VT_TRISTATE         VT_I2
  318. #define VT_OPTEXCLUSIVE     VT_BOOL
  319. #define VT_FONT             VT_DISPATCH
  320. #define VT_PICTURE          VT_DISPATCH
  321.  
  322. #ifdef _WIN32
  323. #define VT_HANDLE           VT_I4
  324. #else
  325. #define VT_HANDLE           VT_I2
  326. #endif
  327.  
  328.  
  329. /////////////////////////////////////////////////////////////////////////////
  330. // Reflected Window Message IDs
  331.  
  332. #define OCM__BASE           (WM_USER+0x1c00)
  333. #define OCM_COMMAND         (OCM__BASE + WM_COMMAND)
  334.  
  335. #ifdef _WIN32
  336. #define OCM_CTLCOLORBTN     (OCM__BASE + WM_CTLCOLORBTN)
  337. #define OCM_CTLCOLOREDIT    (OCM__BASE + WM_CTLCOLOREDIT)
  338. #define OCM_CTLCOLORDLG     (OCM__BASE + WM_CTLCOLORDLG)
  339. #define OCM_CTLCOLORLISTBOX (OCM__BASE + WM_CTLCOLORLISTBOX)
  340. #define OCM_CTLCOLORMSGBOX  (OCM__BASE + WM_CTLCOLORMSGBOX)
  341. #define OCM_CTLCOLORSCROLLBAR   (OCM__BASE + WM_CTLCOLORSCROLLBAR)
  342. #define OCM_CTLCOLORSTATIC  (OCM__BASE + WM_CTLCOLORSTATIC)
  343. #else
  344. #define OCM_CTLCOLOR        (OCM__BASE + WM_CTLCOLOR)
  345. #endif
  346.  
  347. #define OCM_DRAWITEM        (OCM__BASE + WM_DRAWITEM)
  348. #define OCM_MEASUREITEM     (OCM__BASE + WM_MEASUREITEM)
  349. #define OCM_DELETEITEM      (OCM__BASE + WM_DELETEITEM)
  350. #define OCM_VKEYTOITEM      (OCM__BASE + WM_VKEYTOITEM)
  351. #define OCM_CHARTOITEM      (OCM__BASE + WM_CHARTOITEM)
  352. #define OCM_COMPAREITEM     (OCM__BASE + WM_COMPAREITEM)
  353. #define OCM_HSCROLL         (OCM__BASE + WM_HSCROLL)
  354. #define OCM_VSCROLL         (OCM__BASE + WM_VSCROLL)
  355. #define OCM_PARENTNOTIFY    (OCM__BASE + WM_PARENTNOTIFY)
  356.  
  357. #if (WINVER >= 0x0400)
  358. #define OCM_NOTIFY            (OCM__BASE + WM_NOTIFY)
  359. #endif
  360.  
  361.  
  362. /////////////////////////////////////////////////////////////////////////////
  363. // Self-registration APIs (to be implemented by server DLL)
  364.  
  365. STDAPI DllRegisterServer(void);
  366. STDAPI DllUnregisterServer(void);
  367.  
  368.  
  369. /////////////////////////////////////////////////////////////////////////////
  370. // POINTF structure
  371.  
  372. typedef struct tagPOINTF
  373. {
  374.     float x;
  375.     float y;
  376.  
  377. } POINTF;
  378.  
  379.  
  380. /////////////////////////////////////////////////////////////////////////////
  381. // CONTROLINFO structure
  382.  
  383. typedef struct tagCONTROLINFO
  384. {
  385.     ULONG cb;       // Structure size
  386.     HACCEL hAccel;  // Control mnemonics
  387.     USHORT cAccel;  // Number of entries in mnemonics table
  388.     DWORD dwFlags;  // Flags chosen from below
  389.  
  390. } CONTROLINFO;
  391.  
  392. #define CTRLINFO_EATS_RETURN    1   // Control doesn't send Return to container
  393. #define CTRLINFO_EATS_ESCAPE    2   // Control doesn't send Escape to container
  394.  
  395.  
  396. /////////////////////////////////////////////////////////////////////////////
  397. // IOleControl interface
  398.  
  399. #undef  INTERFACE
  400. #define INTERFACE IOleControl
  401.  
  402. DECLARE_INTERFACE_(IOleControl, IUnknown)
  403. {
  404.         BEGIN_INTERFACE
  405.         // IUnknown methods
  406.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  407.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  408.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  409.  
  410.     // IOleControl methods
  411.     STDMETHOD(GetControlInfo)(THIS_ LPCONTROLINFO pCI) PURE;
  412.     STDMETHOD(OnMnemonic)(THIS_ LPMSG pMsg) PURE;
  413.     STDMETHOD(OnAmbientPropertyChange)(THIS_ DISPID dispid) PURE;
  414.     STDMETHOD(FreezeEvents)(THIS_ BOOL bFreeze) PURE;
  415. };
  416.  
  417.  
  418. /////////////////////////////////////////////////////////////////////////////
  419. // IOleControlSite interface
  420.  
  421. #undef  INTERFACE
  422. #define INTERFACE IOleControlSite
  423.  
  424. DECLARE_INTERFACE_(IOleControlSite, IUnknown)
  425. {
  426.         BEGIN_INTERFACE
  427.         // IUnknown methods
  428.         STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  429.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  430.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  431.  
  432.     // IOleControlSite methods
  433.         STDMETHOD(OnControlInfoChanged)(THIS) PURE;
  434.     STDMETHOD(LockInPlaceActive)(THIS_ BOOL fLock) PURE;
  435.     STDMETHOD(GetExtendedControl)(THIS_ LPDISPATCH FAR* ppDisp) PURE;
  436.     STDMETHOD(TransformCoords)(THIS_ POINTL FAR* lpptlHimetric,
  437.         POINTF FAR* lpptfContainer, DWORD flags) PURE;
  438.     STDMETHOD(TranslateAccelerator)(THIS_ LPMSG lpMsg, DWORD grfModifiers)
  439.         PURE;
  440.     STDMETHOD(OnFocus)(THIS_ BOOL fGotFocus) PURE;
  441.     STDMETHOD(ShowPropertyFrame)(THIS) PURE;
  442. };
  443.  
  444. #define XFORMCOORDS_POSITION            0x1
  445. #define XFORMCOORDS_SIZE                0x2
  446. #define XFORMCOORDS_HIMETRICTOCONTAINER 0x4
  447. #define XFORMCOORDS_CONTAINERTOHIMETRIC 0x8
  448.  
  449.  
  450. /////////////////////////////////////////////////////////////////////////////
  451. // IErrorLog interface
  452.  
  453. #undef  INTERFACE
  454. #define INTERFACE IErrorLog
  455.  
  456. DECLARE_INTERFACE_(IErrorLog, IUnknown)
  457. {
  458.         BEGIN_INTERFACE
  459.         // IUnknown methods
  460.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  461.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  462.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  463.  
  464.     // IErrorLog methods
  465.     STDMETHOD(AddError)(THIS_ LPCOLESTR pszPropName, LPEXCEPINFO pExcepInfo) PURE;
  466. };
  467.  
  468.  
  469. /////////////////////////////////////////////////////////////////////////////
  470. // IPropertyBag interface
  471.  
  472. #undef  INTERFACE
  473. #define INTERFACE IPropertyBag
  474.  
  475. DECLARE_INTERFACE_(IPropertyBag, IUnknown)
  476. {
  477.         BEGIN_INTERFACE
  478.         // IUnknown methods
  479.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void * * ppvObj) PURE;
  480.         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  481.         STDMETHOD_(ULONG,Release)(THIS) PURE;
  482.  
  483.     // IPropertyBag methods
  484.     STDMETHOD(Read)(THIS_ LPCOLESTR pszPropName, LPVARIANT pVar,
  485.         LPERRORLOG pErrorLog) PURE;
  486.     STDMETHOD(Write)(THIS_ LPCOLESTR pszPropName, LPVARIANT pVar) PURE;
  487. };
  488.  
  489.  
  490. /////////////////////////////////////////////////////////////////////////////
  491. // IPersistPropertyBag interface
  492.  
  493. #undef  INTERFACE
  494. #define INTERFACE IPersistPropertyBag
  495.  
  496. DECLARE_INTERFACE_(IPersistPropertyBag, IPersist)
  497. {
  498.         BEGIN_INTERFACE
  499.         // IUnknown methods
  500.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  501.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  502.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  503.  
  504.     // IPersist methods
  505.     STDMETHOD(GetClassID)(THIS_ LPCLSID lpClassID) PURE;
  506.  
  507.     // IPersistPropertyBag methods
  508.     STDMETHOD(InitNew)(THIS) PURE;
  509.     STDMETHOD(Load)(THIS_ LPPROPERTYBAG pPropBag, LPERRORLOG pErrorLog) PURE;
  510.         STDMETHOD(Save)(THIS_ LPPROPERTYBAG pPropBag, BOOL fClearDirty,
  511.         BOOL fSaveAllProperties) PURE;
  512. };
  513.  
  514.  
  515. /////////////////////////////////////////////////////////////////////////////
  516. // IPersistStreamInit interface
  517.  
  518. #undef  INTERFACE
  519. #define INTERFACE IPersistStreamInit
  520.  
  521. DECLARE_INTERFACE_(IPersistStreamInit, IPersist)
  522. {
  523.         BEGIN_INTERFACE
  524.         // IUnknown methods
  525.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  526.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  527.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  528.  
  529.     // IPersist methods
  530.     STDMETHOD(GetClassID)(THIS_ LPCLSID lpClassID) PURE;
  531.  
  532.         // IPersistStreamInit methods
  533.     STDMETHOD(IsDirty)(THIS) PURE;
  534.         STDMETHOD(Load)(THIS_ LPSTREAM pStm) PURE;
  535.         STDMETHOD(Save)(THIS_ LPSTREAM pStm, unsigned long fClearDirty) PURE;
  536.     STDMETHOD(GetSizeMax)(THIS_ ULARGE_INTEGER FAR* pcbSize) PURE;
  537.     STDMETHOD(InitNew)(THIS) PURE;
  538. };
  539.  
  540.  
  541. /////////////////////////////////////////////////////////////////////////////
  542. // IPersistMemory interface
  543.  
  544. #undef  INTERFACE
  545. #define INTERFACE IPersistMemory
  546.  
  547. DECLARE_INTERFACE_(IPersistMemory, IPersist)
  548. {
  549.         BEGIN_INTERFACE
  550.         // IUnknown methods
  551.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  552.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  553.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  554.  
  555.     // IPersist methods
  556.     STDMETHOD(GetClassID)(THIS_ LPCLSID lpClassID) PURE;
  557.  
  558.     // IPersistMemory methods
  559.     STDMETHOD(IsDirty)(THIS) PURE;
  560.     STDMETHOD(Load)(THIS_ LPVOID lpStream, ULONG cbSize) PURE;
  561.     STDMETHOD(Save)(THIS_ LPVOID lpStream, BOOL fClearDirty, ULONG cbSize) PURE;
  562.     STDMETHOD(GetSizeMax)(THIS_ ULONG* pcbSize) PURE;
  563.     STDMETHOD(InitNew)(THIS) PURE;
  564. };
  565.  
  566.  
  567. /////////////////////////////////////////////////////////////////////////////
  568. // IPropertyNotifySink interface
  569.  
  570. #undef  INTERFACE
  571. #define INTERFACE IPropertyNotifySink
  572.  
  573. DECLARE_INTERFACE_(IPropertyNotifySink, IUnknown)
  574. {
  575.         BEGIN_INTERFACE
  576.         // IUnknown methods
  577.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  578.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  579.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  580.  
  581.     // IPropertyNotifySink methods
  582.     STDMETHOD(OnChanged)(THIS_ DISPID dispid) PURE;
  583.     STDMETHOD(OnRequestEdit)(THIS_ DISPID dispid) PURE;
  584. };
  585.  
  586.  
  587. /////////////////////////////////////////////////////////////////////////////
  588. // IProvideClassInfo interface
  589.  
  590. #undef  INTERFACE
  591. #define INTERFACE IProvideClassInfo
  592.  
  593. DECLARE_INTERFACE_(IProvideClassInfo, IUnknown)
  594. {
  595.         BEGIN_INTERFACE
  596.         // IUnknown methods
  597.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  598.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  599.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  600.  
  601.     // IProvideClassInfo methods
  602.     STDMETHOD(GetClassInfo)(THIS_ LPTYPEINFO FAR* ppTI) PURE;
  603. };
  604.  
  605.  
  606. /////////////////////////////////////////////////////////////////////////////
  607. // IProvideClassInfo2 interface
  608.  
  609. #undef  INTERFACE
  610. #define INTERFACE IProvideClassInfo2
  611.  
  612. DECLARE_INTERFACE_(IProvideClassInfo2, IProvideClassInfo)
  613. {
  614.         BEGIN_INTERFACE
  615.         // IUnknown methods
  616.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  617.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  618.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  619.  
  620.     // IProvideClassInfo methods
  621.     STDMETHOD(GetClassInfo)(THIS_ LPTYPEINFO FAR* ppTI) PURE;
  622.  
  623.     // IProvideClassInfo2 methods
  624.     STDMETHOD(GetGUID)(THIS_ DWORD dwGuidKind, GUID FAR* pGUID) PURE;
  625. };
  626.  
  627. #define GUIDKIND_DEFAULT_SOURCE_DISP_IID    1
  628.  
  629. /////////////////////////////////////////////////////////////////////////////
  630. // IConnectionPointContainer interface
  631.  
  632. #undef  INTERFACE
  633. #define INTERFACE IConnectionPointContainer
  634.  
  635. DECLARE_INTERFACE_(IConnectionPointContainer, IUnknown)
  636. {
  637.         BEGIN_INTERFACE
  638.         // IUnknown methods
  639.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  640.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  641.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  642.  
  643.     // IConnectionPointContainer methods
  644.     STDMETHOD(EnumConnectionPoints)(THIS_ LPENUMCONNECTIONPOINTS FAR* ppEnum)
  645.         PURE;
  646.     STDMETHOD(FindConnectionPoint)(THIS_ REFIID iid,
  647.         LPCONNECTIONPOINT FAR* ppCP) PURE;
  648. };
  649.  
  650.  
  651. /////////////////////////////////////////////////////////////////////////////
  652. // IEnumConnectionPoint interface
  653.  
  654. #undef  INTERFACE
  655. #define INTERFACE IEnumConnectionPoints
  656.  
  657. DECLARE_INTERFACE_(IEnumConnectionPoints, IUnknown)
  658. {
  659.         BEGIN_INTERFACE
  660.         // IUnknown methods
  661.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  662.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  663.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  664.  
  665.     // IEnumConnectionPoints methods
  666.     STDMETHOD(Next)(THIS_ ULONG cConnections, LPCONNECTIONPOINT FAR* rgpcn,
  667.         ULONG FAR* lpcFetched) PURE;
  668.     STDMETHOD(Skip)(THIS_ ULONG cConnections) PURE;
  669.     STDMETHOD(Reset)(THIS) PURE;
  670.     STDMETHOD(Clone)(THIS_ LPENUMCONNECTIONPOINTS FAR* ppEnum) PURE;
  671. };
  672.  
  673.  
  674. /////////////////////////////////////////////////////////////////////////////
  675. // IConnectionPoint interface
  676.  
  677. #undef  INTERFACE
  678. #define INTERFACE IConnectionPoint
  679.  
  680. DECLARE_INTERFACE_(IConnectionPoint, IUnknown)
  681. {
  682.         BEGIN_INTERFACE
  683.         // IUnknown methods
  684.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  685.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  686.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  687.  
  688.     // IConnectionPoint methods
  689.     STDMETHOD(GetConnectionInterface)(THIS_ IID FAR* pIID) PURE;
  690.     STDMETHOD(GetConnectionPointContainer)(THIS_
  691.         IConnectionPointContainer FAR* FAR* ppCPC) PURE;
  692.     STDMETHOD(Advise)(THIS_ LPUNKNOWN pUnkSink, DWORD FAR* pdwCookie) PURE;
  693.     STDMETHOD(Unadvise)(THIS_ DWORD dwCookie) PURE;
  694.     STDMETHOD(EnumConnections)(THIS_ LPENUMCONNECTIONS FAR* ppEnum) PURE;
  695. };
  696.  
  697.  
  698. /////////////////////////////////////////////////////////////////////////////
  699. // CONNECTDATA structure
  700.  
  701. typedef struct tagCONNECTDATA
  702. {
  703.     LPUNKNOWN pUnk;
  704.         DWORD dwCookie;
  705.  
  706. } CONNECTDATA;
  707.  
  708.  
  709. /////////////////////////////////////////////////////////////////////////////
  710. // IEnumConnections interface
  711.  
  712. #undef  INTERFACE
  713. #define INTERFACE IEnumConnections
  714.  
  715. DECLARE_INTERFACE_(IEnumConnections, IUnknown)
  716. {
  717.     // IUnknown methods
  718.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  719.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  720.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  721.  
  722.     // IEnumConnections methods
  723.     STDMETHOD(Next)(THIS_ ULONG cConnections, LPCONNECTDATA rgcd,
  724.         ULONG FAR* lpcFetched) PURE;
  725.     STDMETHOD(Skip)(THIS_ ULONG cConnections) PURE;
  726.     STDMETHOD(Reset)(THIS) PURE;
  727.     STDMETHOD(Clone)(THIS_ LPENUMCONNECTIONS FAR* ppecn) PURE;
  728. };
  729.  
  730.  
  731. /////////////////////////////////////////////////////////////////////////////
  732. // LICINFO structure
  733.  
  734. typedef struct tagLICINFO
  735. {
  736.     long cbLicInfo;
  737.     BOOL fRuntimeKeyAvail;
  738.     BOOL fLicVerified;
  739.  
  740. } LICINFO;
  741.  
  742.  
  743. /////////////////////////////////////////////////////////////////////////////
  744. // IClassFactory2 interface
  745.  
  746. #undef  INTERFACE
  747. #define INTERFACE IClassFactory2
  748.  
  749. DECLARE_INTERFACE_(IClassFactory2, IClassFactory)
  750. {
  751.     // IUnknown methods
  752.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  753.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  754.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  755.  
  756.     // IClassFactory methods
  757.     STDMETHOD(CreateInstance)(THIS_ LPUNKNOWN pUnkOuter, REFIID riid,
  758.         LPVOID FAR* ppvObject) PURE;
  759.     STDMETHOD(LockServer)(THIS_ BOOL fLock) PURE;
  760.  
  761.     //  IClassFactory2 methods
  762.     STDMETHOD(GetLicInfo)(THIS_ LPLICINFO pLicInfo) PURE;
  763.     STDMETHOD(RequestLicKey)(THIS_ DWORD dwResrved, BSTR FAR* pbstrKey) PURE;
  764.     STDMETHOD(CreateInstanceLic)(THIS_ LPUNKNOWN pUnkOuter,
  765.         LPUNKNOWN pUnkReserved, REFIID riid, BSTR bstrKey,
  766.         LPVOID FAR* ppvObject) PURE;
  767. };
  768.  
  769.  
  770. /////////////////////////////////////////////////////////////////////////////
  771. //  CAUUID structure - a counted array of UUIDs
  772.  
  773. #ifndef _tagCAUUID_DEFINED
  774. #define _tagCAUUID_DEFINED
  775. #define _CAUUID_DEFINED
  776.  
  777. typedef struct tagCAUUID
  778. {
  779.         ULONG cElems;
  780.         GUID FAR* pElems;
  781.  
  782. } CAUUID;
  783.  
  784. #endif
  785.  
  786. /////////////////////////////////////////////////////////////////////////////
  787. // ISpecifyPropertyPages interface
  788.  
  789. #undef  INTERFACE
  790. #define INTERFACE ISpecifyPropertyPages
  791.  
  792. DECLARE_INTERFACE_(ISpecifyPropertyPages, IUnknown)
  793. {
  794.         BEGIN_INTERFACE
  795.         // IUnknown methods
  796.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  797.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  798.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  799.  
  800.     // ISpecifyPropertyPages methods
  801.     STDMETHOD(GetPages)(THIS_ CAUUID *pPages) PURE;
  802. };
  803.  
  804.  
  805.  
  806. /////////////////////////////////////////////////////////////////////////////
  807. //  CALPOLESTR structure - a counted array of LPOLESTRs
  808.  
  809. #ifndef _tagCALPOLESTR_DEFINED
  810. #define _tagCALPOLESTR_DEFINED
  811. #define _CALPOLESTR_DEFINED
  812.  
  813. typedef struct tagCALPOLESTR
  814. {
  815.     ULONG cElems;
  816.     LPOLESTR FAR* pElems;
  817.  
  818. } CALPOLESTR;
  819.  
  820. #endif
  821.  
  822.  
  823. /////////////////////////////////////////////////////////////////////////////
  824. //  CAUUID structure - a counted array of DWORDs
  825.  
  826. #ifndef _tagCADWORD_DEFINED
  827. #define _tagCADWORD_DEFINED
  828. #define _CADWORD_DEFINED
  829.  
  830. typedef struct tagCADWORD
  831. {
  832.     ULONG cElems;
  833.     DWORD FAR* pElems;
  834.  
  835. } CADWORD;
  836.  
  837. #endif
  838.  
  839.  
  840. #ifdef _WIN32
  841. #ifndef RC_INVOKED
  842. #pragma pack()
  843. #endif // not RC_INVOKED
  844. #endif // _WIN32
  845.  
  846. #endif // not __MKTYPLIB__
  847.  
  848.  
  849. /////////////////////////////////////////////////////////////////////////////
  850. //  Standard dispatch ID constants
  851.  
  852. #define DISPID_AUTOSIZE                 (-500)
  853. #define DISPID_BACKCOLOR                (-501)
  854. #define DISPID_BACKSTYLE                (-502)
  855. #define DISPID_BORDERCOLOR              (-503)
  856. #define DISPID_BORDERSTYLE              (-504)
  857. #define DISPID_BORDERWIDTH              (-505)
  858. #define DISPID_DRAWMODE                 (-507)
  859. #define DISPID_DRAWSTYLE                (-508)
  860. #define DISPID_DRAWWIDTH                (-509)
  861. #define DISPID_FILLCOLOR                (-510)
  862. #define DISPID_FILLSTYLE                (-511)
  863. #define DISPID_FONT                     (-512)
  864. #define DISPID_FORECOLOR                (-513)
  865. #define DISPID_ENABLED                  (-514)
  866. #define DISPID_HWND                     (-515)
  867. #define DISPID_TABSTOP                  (-516)
  868. #define DISPID_TEXT                     (-517)
  869. #define DISPID_CAPTION                  (-518)
  870. #define DISPID_BORDERVISIBLE            (-519)
  871. #define DISPID_APPEARANCE                (-520)
  872.  
  873. #define DISPID_REFRESH                  (-550)
  874. #define DISPID_DOCLICK                  (-551)
  875. #define DISPID_ABOUTBOX                 (-552)
  876.  
  877. #define DISPID_DBLCLICK                 (-600)
  878. #define DISPID_KEYDOWN                  (-601)
  879. #define DISPID_AUTOKEY                  (-602)
  880. #define DISPID_KEYUP                    (-603)
  881. #define DISPID_MOUSEDOWN                (-604)
  882. #define DISPID_MOUSEUP                  (-605)
  883.  
  884. #define DISPID_AMBIENT_BACKCOLOR        (-701)
  885. #define DISPID_AMBIENT_DISPLAYNAME      (-702)
  886. #define DISPID_AMBIENT_FONT             (-703)
  887. #define DISPID_AMBIENT_FORECOLOR        (-704)
  888. #define DISPID_AMBIENT_LOCALEID         (-705)
  889. #define DISPID_AMBIENT_MESSAGEREFLECT   (-706)
  890. #define DISPID_AMBIENT_SCALEUNITS       (-707)
  891. #define DISPID_AMBIENT_TEXTALIGN        (-708)
  892. #define DISPID_AMBIENT_USERMODE         (-709)
  893. #define DISPID_AMBIENT_UIDEAD           (-710)
  894. #define DISPID_AMBIENT_SHOWGRABHANDLES  (-711)
  895. #define DISPID_AMBIENT_SHOWHATCHING     (-712)
  896. #define DISPID_AMBIENT_DISPLAYASDEFAULT (-713)
  897. #define DISPID_AMBIENT_SUPPORTSMNEMONICS (-714)
  898. #define DISPID_AMBIENT_AUTOCLIP         (-715)
  899. #define DISPID_AMBIENT_APPEARANCE        (-716)
  900.  
  901.  
  902. /////////////////////////////////////////////////////////////////////////////
  903. // Dispatch ID constants for font and picture types
  904.  
  905. #define DISPID_FONT_NAME    0
  906. #define DISPID_FONT_SIZE    2
  907. #define DISPID_FONT_BOLD    3
  908. #define DISPID_FONT_ITALIC  4
  909. #define DISPID_FONT_UNDER   5
  910. #define DISPID_FONT_STRIKE  6
  911. #define DISPID_FONT_WEIGHT  7
  912. #define DISPID_FONT_CHARSET 8
  913.  
  914. #define DISPID_PICT_HANDLE  0
  915. #define DISPID_PICT_HPAL    2
  916. #define DISPID_PICT_TYPE    3
  917. #define DISPID_PICT_WIDTH   4
  918. #define DISPID_PICT_HEIGHT  5
  919. #define DISPID_PICT_RENDER  6
  920.  
  921.  
  922. #ifdef __MKTYPLIB__
  923.  
  924. /////////////////////////////////////////////////////////////////////////////
  925. // Names of modules containing type libraries for standard types
  926.  
  927. #define STDOLE_TLB "stdole32.tlb"
  928. #define STDTYPE_TLB "olepro32.dll"
  929.  
  930. #endif // __MKTYPLIB__
  931.  
  932. #endif // _OLECTL_H_
  933.